package com.maple.phoneward.entity;

import java.util.Date;

/**
 * SmsInfo.java
 * 
 * @author YaJian Qiu
 * @time 2013-3-20 下午11:30:59<br>
 *       本类描述：信息类
 * 
 */
public class SmsInfo {

	/**
	 * 信息Id，与信息数据库的Id对应
	 */
	private Long smsId;

	/**
	 * 发信人或收信人号码
	 */
	private String address;

	/**
	 * 发信人，收信人名称
	 */
	private String person;

	/**
	 * 收信1，发信2
	 */
	private Integer type;

	/**
	 * 发信或手信时间
	 */
	private Date date;

	/**
	 * 信息内容
	 */
	private String body;

	/**
	 * 是否阅读0未读，1已读
	 */
	private Integer read;

	public SmsInfo() {
	}

	public SmsInfo(Long smsId, String address, String person, Integer type, Date date, String body, Integer read) {
		this.smsId = smsId;
		this.address = address;
		if (person == null || "".equals(person)) {
			person = "未知";
		}
		this.person = person;
		this.type = type;
		this.date = date;
		this.body = body;
		this.read = read;
	}

	public Long getSmsId() {
		return smsId;
	}

	public void setSmsId(Long smsId) {
		this.smsId = smsId;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPerson() {
		return person;
	}

	public void setPerson(String person) {
		if (person == null || "".equals(person)) {
			person = "未知";
		}
		this.person = person;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public Integer getRead() {
		return read;
	}

	public void setRead(Integer read) {
		this.read = read;
	}

	@Override
	public String toString() {
		return "SmsInfo [smsId=" + smsId + ", address=" + address + ", person=" + person + ", type=" + type + ", date=" + date + ", body=" + body + ", read=" + read + "]";
	}

}
